﻿using System;
using Microsoft.Maps.MapControl.WPF;
using System.Windows.Media;

namespace Shrestha.Trigraph
{
    public class TriEvent : Location, IComparable<TriEvent>
    {
        public Brush StrokeColor { get; set; }
        public Brush FillColor { get; set; }

        private DateTime date;
        public String GroupVal { get; set; }

        public DateTime EventDate
        {
            get { return date; }
            set { date = value; }
        }

        public TriEvent(double latitude, double longitude, DateTime date, string group)
        {
            this.Latitude = latitude;
            this.Longitude = longitude;
            this.date = date;
            this.GroupVal = group;
        }

        public TriEvent(double latitude, double longitude, DateTime date)
        {
            this.Latitude = latitude;
            this.Longitude = longitude;
            this.date = date;
            this.StrokeColor = Brushes.Blue;
            this.FillColor = Brushes.LightBlue;
        }

        public TriEvent(double latitude, double longitude)
        {
            this.Latitude = latitude;
            this.Longitude = longitude;
        }

        public TriEvent() { }

        public int CompareTo(TriEvent other)
        {
            if (this.Latitude == other.Latitude && this.Longitude == other.Longitude && this.EventDate.Equals(other.EventDate))
                return 0;
            else return 1;
        }
    }
}
